package com.paas.form.core.element.control.impl.searchItem;

import com.paas.form.core.element.control.FormItem;
import com.paas.form.core.element.field.FieLdsModel;
import com.paas.form.core.element.jsContent.ScriptContent;
import lombok.Data;


@Data
public class ElTimePicker implements FormItem {
    private FieLdsModel field;

    private String htmlType;

    public static final String EL_TIME_PICKER ="<el-time-picker v-model=\"${formObject}.${field.vModel}\" " +
            " style=\"width: 100%;\" format=\"HH:mm:ss\"  value-format=\"HH:mm:ss\"  clearable  " +
            "  class=\"item\" />";
    public static final String EL_TIME_PICKER_OLD ="<el-time-picker v-model=\"${formObject}.${field.vModel}\" start-placeholder=\"开始时间\" end-placeholder=\"结束时间\"\n" +
            "                clearable  is-range" +
            "  class=\"item\" />";
//    public static final String EL_TIME_PICKER ="<el-time-picker v-model=\"${formObject}.${field.vModel}\" start-placeholder=\"开始时间\" end-placeholder=\"结束时间\"\n" +
//            "                clearable :value-format=\"${field.valueformat}\" :format=\"${field.format}\" is-range\n" +
//            "                class=\"item\" />";


    public ElTimePicker(FieLdsModel field,String htmlType){
        this.field = field;
        this.htmlType = htmlType;

    }


    @Override
    public String makeVue() {
        return EL_TIME_PICKER;
    }

    @Override
    public ScriptContent makeJs() {
        return null;
    }
}
